package cn.itcast.springboot.service;

import cn.itcast.springboot.mapper.UserMapper;
import cn.itcast.springboot.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @package cn.itcast.springboot.service
 * @description:
 * @author: 许超越
 * @date 2019/6/9 17:25
 * @version: V1.0
 */
@Service("userService")
public class UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 通过id查询单个用户
     * @param id
     * @return
     */
    public User queryUserById(Long id) {
       return userMapper.selectByPrimaryKey(id);
    }
}
